package com.zz.inventory.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 客户端管理对象 clients
 * 
 * @author ruoyi
 * @date 2025-07-02
 */
public class Clients extends BaseEntity
{
    // 关联的机房信息，使用 Labs 实体类
    private Labs labs;

    private static final long serialVersionUID = 1L;

    /** 客户端ID */
    private Long clientId;

    /** 所属学校ID */
    @Excel(name = "所属学校ID")
    private Long schoolId;

    /** 所属机房ID */
    @Excel(name = "所属机房ID")
    private Long labId;

    /** 客户端名称 (如：PC - 01) */
    @NotBlank(message = "客户端名称不能为空")
    private String clientName;

    /** IP地址 */
    @Excel(name = "IP地址")
    private String ipAddress;

    /** MAC地址 */
    @NotBlank(message = "MAC地址不能为空")
    private String macAddress;

    /** 状态: 在线, 离线, 使用中, 维护中 */
    @Excel(name = "状态: 在线, 离线, 使用中, 维护中")
    private String status;

    /** 最后心跳时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后心跳时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastHeartbeat;

    /** 注册时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "注册时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date registrationTime;

    public Labs getLabs() {
        return labs;
    }

    public void setLabs(Labs labs) {
        this.labs = labs;
    }

    public void setClientId(Long clientId)
    {
        this.clientId = clientId;
    }

    public Long getClientId() 
    {
        return clientId;
    }

    public void setSchoolId(Long schoolId) 
    {
        this.schoolId = schoolId;
    }

    public Long getSchoolId() 
    {
        return schoolId;
    }

    public void setLabId(Long labId) 
    {
        this.labId = labId;
    }

    public Long getLabId() 
    {
        return labId;
    }

    public void setClientName(String clientName) 
    {
        this.clientName = clientName;
    }

    public String getClientName() 
    {
        return clientName;
    }

    public void setIpAddress(String ipAddress) 
    {
        this.ipAddress = ipAddress;
    }

    public String getIpAddress() 
    {
        return ipAddress;
    }

    public void setMacAddress(String macAddress) 
    {
        this.macAddress = macAddress;
    }

    public String getMacAddress() 
    {
        return macAddress;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public void setLastHeartbeat(Date lastHeartbeat) 
    {
        this.lastHeartbeat = lastHeartbeat;
    }

    public Date getLastHeartbeat() 
    {
        return lastHeartbeat;
    }

    public void setRegistrationTime(Date registrationTime) 
    {
        this.registrationTime = registrationTime;
    }

    public Date getRegistrationTime() 
    {
        return registrationTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("clientId", getClientId())
            .append("schoolId", getSchoolId())
            .append("labId", getLabId())
            .append("clientName", getClientName())
            .append("ipAddress", getIpAddress())
            .append("macAddress", getMacAddress())
            .append("status", getStatus())
            .append("lastHeartbeat", getLastHeartbeat())
            .append("registrationTime", getRegistrationTime())
            .toString();
    }
}
